#include<stdio.h>

int main(){
    int i, Letters = 0, Digits = 0, Others = 0;
    
    while((i = getchar()) != '?' && i != EOF){
        if(i >='A' && i <='Z' || i >='a' && i <= 'z')
            Letters++;
        else if(i >= '1' && i <= '9')
            Digits++;
        else
            Others++;
    }
    printf("Letters=%d\nDigits=%d\nOthers=%d\n",Letters,Digits,Others);
    return 0;
}

/*输入一串字符，以“?”结束。统计其中字母个数，数字个数，其它符号个数。*/